#include "Utility.h"

using namespace Graphics;

D3DXVECTOR2 Utility::NeroToDXD(NVector2 rhs)
{
	return D3DXVECTOR2(rhs.X, rhs.Y);
}

D3DXVECTOR3 Utility::NeroToDXD(NVector3 rhs)
{
	return D3DXVECTOR3(rhs.X, rhs.Y, rhs.Z);
}

D3DXMATRIX Utility::NeroToDXD(NMatrix4 rhs)
{
	D3DXMATRIX result;

	result._11 = rhs._11;
	result._12 = rhs._12;
	result._13 = rhs._13;
	result._14 = rhs._14;

	result._21 = rhs._21;
	result._22 = rhs._22;
	result._23 = rhs._23;
	result._24 = rhs._24;

	result._31 = rhs._31;
	result._32 = rhs._32;
	result._33 = rhs._33;
	result._34 = rhs._34;

	result._41 = rhs._41;
	result._42 = rhs._42;
	result._43 = rhs._43;
	result._44 = rhs._44;

	return result;
}

NVector2 Utility::DXDToNero(D3DXVECTOR2 rhs)
{
	return NVector2(rhs.x, rhs.y);
}

NVector3 Utility::DXDToNero(D3DXVECTOR3 rhs)
{
	return NVector3(rhs.x, rhs.y, rhs.z);
}

NMatrix4 Utility::DXDToNero(D3DXMATRIX rhs)
{
	NMatrix4 result;

	result._11 = rhs._11;
	result._12 = rhs._12;
	result._13 = rhs._13;
	result._14 = rhs._14;

	result._21 = rhs._21;
	result._22 = rhs._22;
	result._23 = rhs._23;
	result._24 = rhs._24;

	result._31 = rhs._31;
	result._32 = rhs._32;
	result._33 = rhs._33;
	result._34 = rhs._34;

	result._41 = rhs._41;
	result._42 = rhs._42;
	result._43 = rhs._43;
	result._44 = rhs._44;

	return result;
}